package com.thread;

import java.util.concurrent.CompletableFuture;

/**
 * 描述:
 *
 * @author luzhongfu
 * Created by lucky on 2022-05-07 1:59 PM
 */
public class ComplateableFutureTest2 {

    public static void main(String[] args) {
        CompletableFuture.supplyAsync(()->{
//            throw new RuntimeException("aaa");
            return "222";
        }).whenComplete((d,e)->{
            System.out.println(e.getMessage());
        });
    }
}
